Personify Data Services – Multi-Org Support

As of 1.5.0, Personify Data Services supports multi-org. In the previous versions, it was required to set up a separate data services site for each organization unit and the default organization specified in Web.Config determined the organization for that site.

 

The Web.Config of the web site where the controls are hosted has the “RegistrySetting” key where you specify under which tree are the credential settings located:

<add key="RegistrySetting" value="HKEY_LOCAL_MACHINE\SOFTWARE\TMA Resources\UniversalWebService_DemoQA\" />

When reading from the registry, ASP.NET uses the Wow6432Node, even when the specified path does not include it when running in a 64 bit environment.

The setting defined under this key are the default settings the controls will use to talk to the data service. The setting names are:

·            UserName_Base

·            Password_Base

If your organization does not use multiple organization units, then settings these values to the correct PSM user name and password in the root folder will suffice.

 

In order to support multi-organization via a single data services instance, you must create one user account on the User Maintenance (PSM001) screen in the Personify back office per organization unit and assign to only that organization unit. For example, if you have 10 organization units, you will have to create 10 user accounts and assign to the appropriate organization unit.

 

Then, for the combination of each organization and organization unit, you will have to create the following tree in the registry.

1.    Update Registry Path – HKEY_LOCAL_MACHINE\SOFTWARE\TMA Resources\Credentials

2.    Create folder – ORGID1_ORGUNITID1

3.    Specify:

·            UserName_Base

·            Password_Base

 

For example, if your association has the following organization structure (Registry Path: HKEY_LOCAL_MACHINE\SOFTWARE\TMA Resources\Credentials):

Organization ID

Organization Unit ID

APA

APA

APA

FUND

APA

EDU

APA2

MISC

APA2

TEST

The Registry Tree would look like the following:

 

Also, while implementing the custom service operations, it is recommended that you use the following properties to get the OrgId and OrgUnitId respectively:

Personify.DataServices.Common.Helpers.Utils.CurrentOrgIdOfAuthnUser

Personify.DataServices.Common.Helpers.Utils.CurrentOrgUnitIdOfAuthnUser

 

Example:

ICustomers oCustomers =

(ICustomers)TIMSS.Global.GetCollection(

       Personify.DataServices.Common.Helpers.Utils.CurrentOrgIdOfAuthnUser,

       Personify.DataServices.Common.Helpers.Utils.CurrentOrgUnitIdOfAuthnUser,

       NamespaceEnum.CustomerInfo,

       "Customers");